function getwindowswidth() {
    return window.innerWidth;
}

//拆分字符串
function changestring(str) {
    var arr = str.split(';');
    //console.log(arr);
    var pesttype = new Array();
    for (var i = 0; i < arr.length; i++) {
        let b = arr[i].split('=');
        // console.log("b", b);

        const regex = /\d+(\.\d+)?/g;
        var numbers = arr[i].match(regex);
        // console.log("nmbers", numbers); //number 数量

        if (b.length != 1) {
            var c = b[1].split(",");
            // console.log("c", c[0]); //c 类型
        }

        if (numbers != null) {
            let e = new Object();
            e.value = numbers[0];
            e.name = c[0];
            // console.log(e);

            pesttype[i] = e;
        }

    }

    return pesttype;
}

export { getwindowswidth, changestring }